/**
 * 搜索相关的类型定义
 */

// 搜索选项
export interface SearchOptions {
  caseSensitive: boolean
  exactMatch: boolean
  fileTypes: string[]
  versionIds: string[]
  maxResults: number
}

// 内容搜索选项
export interface ContentSearchOptions extends SearchOptions {
  contextLines: number
  regex: boolean
}

// 搜索结果
export interface SearchResult {
  versionId: string
  fileId: string
  originalPath: string
  fileName: string
  timestamp: number
  matchScore: number
}

// 内容搜索结果
export interface ContentSearchResult extends SearchResult {
  matches: ContentMatch[]
}

// 内容匹配信息
export interface ContentMatch {
  lineNumber: number
  lineContent: string
  matchStart: number
  matchEnd: number
  context: string[]
}

// 搜索条件
export interface SearchCriteria {
  fileName?: string
  content?: string
  fileType?: string
  dateRange?: DateRange
  sizeRange?: SizeRange
  versionIds?: string[]
}

// 日期范围
export interface DateRange {
  start: Date
  end: Date
}

// 大小范围
export interface SizeRange {
  min: number
  max: number
}